-
Notifications
You must be signed in to change notification settings - Fork 31
Onboard Logs service -instance commands #1184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Ruben Hönle <[email protected]>
Co-authored-by: Ruben Hönle <[email protected]>
Co-authored-by: Ruben Hönle <[email protected]>
Merging this branch changes the coverage (1 decrease, 8 increase)
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
|
|
||
| for _, tt := range tests { | ||
| t.Run(tt.description, func(t *testing.T) { | ||
| cmd := &cobra.Command{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use our util func for that test, it saves all the boilerplate.
| testutils.TestParseInput(t, NewCmd, parseInput, tt.expectedModel, tt.argValues, tt.flagValues, tt.isValid) |
|
|
||
| for _, tt := range tests { | ||
| t.Run(tt.description, func(t *testing.T) { | ||
| p := print.NewPrinter() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
|
|
||
| for _, tt := range tests { | ||
| t.Run(tt.description, func(t *testing.T) { | ||
| p := print.NewPrinter() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
| projectLabel = model.ProjectId | ||
| } | ||
|
|
||
| if !model.AssumeYes { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if !model.AssumeYes { | |
shouldn't be needed anymore after integrating the changes from #1217
| instanceLabel = model.InstanceID | ||
| } | ||
|
|
||
| if !model.AssumeYes { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if !model.AssumeYes { | |
shouldn't be needed anymore after integrating the changes from #1217
| instanceLabel = model.InstanceID | ||
| } | ||
|
|
||
| if !model.AssumeYes { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if !model.AssumeYes { | |
shouldn't be needed anymore after integrating the changes from #1217
| request := apiClient.ListLogsInstances(ctx, model.ProjectId, model.Region) | ||
|
|
||
| return request | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | |
| } | |
| { | ||
| description: "default output", | ||
| instance: &logs.LogsInstance{}, | ||
| model: &inputModel{GlobalFlagModel: &globalflags.GlobalFlagModel{}}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| model: &inputModel{GlobalFlagModel: &globalflags.GlobalFlagModel{}}, | |
| model: &inputModel{GlobalFlagModel: nil, |
a testcase like this would also be interesting
Description
Related to STACKITCLI-292
Checklist
make fmtmake generate-docs(will be checked by CI)make test(will be checked by CI)make lint(will be checked by CI)